
<div class="users form">  <!--  change class to wall form later -->
<?php echo "<h2>" . $user['User']['first_name'] . ' ' . $user['User']['last_name'] . "</h2>"; ?>

<?php 
	echo $this->Form->create('Wall', array('action'=>'update_status','enctype' => 'multipart/form-data'));
	echo $this->Form->input('post_content',array('label' => 'Update Status'));	
	echo $this->Form->end('Post');
?>

<div class="wall_listing">
	<?php if ($posts) {
		foreach ($posts as $post) {	?>
		<div class="post_listing">
            <div class="post_listing_left">
            <?php
                    if (file_exists('img/profile/user/' . $post['Post']['poster_id'] . '.jpg')) {
                        echo $this->Html->image('profile/user/' . $post['Post']['poster_id'] . '.jpg', array('width' => '90'));
                    } else {
                        echo $this->Html->image('default_user.jpg', array('width' => '90'));
                    }
             ?>
            </div>
            <div class="post_listing_right">
            	<p><?php echo $post['User']['first_name'] . ' ' . $post['User']['last_name']; ?></p>
               	<p><?php echo $post['Post']['content']; ?></p>
                <p><?php echo $post['Post']['timestamp']; ?></p>
            </div>
            <div style="clear:both;"></div>
        </div>
	<?php 			
		}
		
	} else {
	?>
<div class="wall_listing_no_post">
<?php 
	echo "<p >" . "Update your status for your friends to see. " . "<p>" ;
	}
?>
	</div>
	</div>
</div>